<template>
    <div class="market"> 
        <Post v-for="(post,index) in list" :key="index" :post="post" :isGroup='true' v-lazy="post"/>
    </div>
</template>

<script>
import Post from '../common/post/Post.vue'
import axios from 'axios'
export default {
    name:'Market',
    components:{
        Post
    },
    data() {
        return {
            list:null
        }
    }, 
    props:['post'],
    mounted() {
        // axios({
        //     url:'/body/findSuch',
        //     method:'get',
        //     params:{
        //         classsname:'跳蚤市场',
        //         // userId:1//默认的用户id
        //     }
        // }).then(data=>{
        //     this.list = data.data.data
        //     console.log(this.list)
        // }).catch(err=>{
        //     console.log(err)
        // })
        this.list = [
            {
                bodyId: 34,
                classname: "跳蚤市场",
                collection: 147,
                content: "生活用品，需要交换请查看详情",
                img: "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.tukuppt.com%2Fpng_preview%2F00%2F36%2F09%2FiEOG4F1n1C.jpg%21%2Ffw%2F780&refer=http%3A%2F%2Fimg.tukuppt.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1651481805&t=1d74d9153f5cbc99c0cfdfa048162a12",
                imgs: `https://img0.baidu.com/it/u=3338564215,1288044827&fm=253&fmt=auto&app=138&f=JPEG?w=280&h=306;
                https://img0.baidu.com/it/u=961941064,2886943166&fm=253&fmt=auto&app=138&f=JPEG?w=388&h=500;
                https://img0.baidu.com/it/u=1743878098,685840147&fm=253&fmt=auto&app=138&f=JPEG?w=750&h=500;
                https://img2.baidu.com/it/u=454087843,2514271705&fm=26&fmt=auto;
                https://img2.baidu.com/it/u=4035036423,1994417825&fm=253&fmt=auto&app=138&f=JPEG?w=310&h=310;
                https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fhimg.china.cn%2F0%2F4_314_113214_750_482.jpg&refer=http%3A%2F%2Fhimg.china.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1651481805&t=12290b0482a5c4d0aeb94ad282623fc0
                `,
                nickname: "十二",
                praise: 294,
                state: 0,
                time: "2022-02-28 19:45:31",
                userId: 11,
            },
            {
                bodyId: 34,
                classname: "跳蚤市场",
                collection: 12,
                content: "闲置课本，宿舍收纳优先交换",
                img: "https://img1.baidu.com/it/u=226913039,354998340&fm=253&fmt=auto&app=138&f=JPEG?w=375&h=500",
                imgs: `https://img2.baidu.com/it/u=1893730724,238884270&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=785;
                https://img2.baidu.com/it/u=88741082,2057913052&fm=253&fmt=auto&app=138&f=JPEG?w=300&h=500;
                https://img0.baidu.com/it/u=319196265,4100908537&fm=253&fmt=auto&app=138&f=JPEG?w=667&h=500;
                https://img0.baidu.com/it/u=454192844,3819959436&fm=253&fmt=auto&app=138&f=GIF?w=115&h=160;
                https://img1.baidu.com/it/u=226913039,354998340&fm=253&fmt=auto&app=138&f=JPEG?w=375&h=500;
                https://img1.baidu.com/it/u=322210013,701162144&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500
                `,
                nickname: "哈哈",
                praise: 14,
                state: 0,
                time: "2022-03-28 9:13:3",
                userId: 11,
            }
        ]
    },
}
</script>

<style>
.market{
    background-color: #fafafa;
}
</style>